package com.imagesystem.system.service.impl;

import java.util.List;
import com.imagesystem.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.imagesystem.system.mapper.WashRecordInfoMapper;
import com.imagesystem.system.domain.WashRecordInfo;
import com.imagesystem.system.service.IWashRecordInfoService;
import com.imagesystem.common.core.text.Convert;

/**
 * 内镜洗消记录明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-11
 */
@Service
public class WashRecordInfoServiceImpl implements IWashRecordInfoService 
{
    @Autowired
    private WashRecordInfoMapper washRecordInfoMapper;

    /**
     * 查询内镜洗消记录明细
     * 
     * @param washBatch 内镜洗消记录明细主键
     * @return 内镜洗消记录明细
     */
    @Override
    public WashRecordInfo selectWashRecordInfoByWashBatch(String washBatch)
    {
        return washRecordInfoMapper.selectWashRecordInfoByWashBatch(washBatch);
    }

    /**
     * 查询内镜洗消记录明细列表
     * 
     * @param washRecordInfo 内镜洗消记录明细
     * @return 内镜洗消记录明细
     */
    @Override
    public List<WashRecordInfo> selectWashRecordInfoList(WashRecordInfo washRecordInfo)
    {
        return washRecordInfoMapper.selectWashRecordInfoList(washRecordInfo);
    }

    /**
     * 新增内镜洗消记录明细
     * 
     * @param washRecordInfo 内镜洗消记录明细
     * @return 结果
     */
    @Override
    public int insertWashRecordInfo(WashRecordInfo washRecordInfo)
    {
        washRecordInfo.setCreateTime(DateUtils.getNowDate());
        return washRecordInfoMapper.insertWashRecordInfo(washRecordInfo);
    }

    /**
     * 修改内镜洗消记录明细
     * 
     * @param washRecordInfo 内镜洗消记录明细
     * @return 结果
     */
    @Override
    public int updateWashRecordInfo(WashRecordInfo washRecordInfo)
    {
        washRecordInfo.setUpdateTime(DateUtils.getNowDate());
        return washRecordInfoMapper.updateWashRecordInfo(washRecordInfo);
    }

    /**
     * 批量删除内镜洗消记录明细
     * 
     * @param washBatchs 需要删除的内镜洗消记录明细主键
     * @return 结果
     */
    @Override
    public int deleteWashRecordInfoByWashBatchs(String washBatchs)
    {
        return washRecordInfoMapper.deleteWashRecordInfoByWashBatchs(Convert.toStrArray(washBatchs));
    }

    /**
     * 删除内镜洗消记录明细信息
     * 
     * @param washBatch 内镜洗消记录明细主键
     * @return 结果
     */
    @Override
    public int deleteWashRecordInfoByWashBatch(String washBatch)
    {
        return washRecordInfoMapper.deleteWashRecordInfoByWashBatch(washBatch);
    }
}
